package com.wodsy.phoenix.dataobject.goodsc.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * TbAreaDict entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tb_area_dict", catalog = "goodsc")
public class AreaDict implements java.io.Serializable {

	// Fields
	private static final long serialVersionUID = 1L;
	
	private Integer id;  
	private Integer pid;  //父节点ID
	private String name;  //省、市或县区名称
	private Short type;   //省、市、县区级别，省：1，市：2，县区：3
	private String code;   //区号
	private String zip;    //邮编
	private String fullName;  //省市县的全称
	private Date createTime;

	// Constructors

	/** default constructor */
	public AreaDict() {
	}

	/** full constructor */
	public AreaDict(Integer pid, String name, Short type, String code,
			String zip, String fullName, Date createTime) {
		this.pid = pid;
		this.name = name;
		this.type = type;
		this.code = code;
		this.zip = zip;
		this.fullName = fullName;
		this.createTime = createTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "pid")
	public Integer getPid() {
		return this.pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	@Column(name = "name", length = 20)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "type")
	public Short getType() {
		return this.type;
	}

	public void setType(Short type) {
		this.type = type;
	}

	@Column(name = "code", length = 5)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "zip", length = 10)
	public String getZip() {
		return this.zip;
	}

	public void setZip(String zip) {
		this.zip = zip;
	}

	@Column(name = "full_name", length = 60)
	public String getFullName() {
		return this.fullName;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	@Column(name = "create_time", length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

}